package com.ay277.htqoa.base.dao;

import com.ay277.htqoa.base.entity.User;
import org.springframework.stereotype.Repository;

import javax.persistence.Query;

/**
 * Created by Salery on 2016/12/9.
 */
@Repository
public class UserDaoImpl extends BaseDao<User,String> implements UserDao {
    {
        type=User.class;
    }

    @Override
    public User exist(String username, String password) {
        return (User) getHibernateTemplate().find("from User where jobNumber=? and password=?",username,password);
    }
}
